#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
    int arr[9] = { 1,2,3,4,5,4,3,2,1 };
    int i = 0; int j = 0;
    for (i = 0; i < 9; i++)
    {
        int count = 0;
        for (j = 0; j < 9; j++)
        {
            if ((i!=j)&&(arr[i]==arr[j]))
            {
                count++;
            }
        }
        if (count == 0)
        {
            printf("%d\n", arr[i]);
        }
    }
    return 0;
}